home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Ebooks / Thinking in C++ V2 / C25 / fillBin.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-25  |  609 b   |  24 lines

  1. //: C25:fillBin.h
  2. // From Thinking in C++, 2nd Edition
  3. // Available at http://www.BruceEckel.com
  4. // (c) Bruce Eckel 1999
  5. // Copyright notice in Copyright.txt
  6. // Open a file and parse its contents into
  7. // Trash objects, placing each into a vector
  8. #ifndef FILLBIN_H
  9. #define FILLBIN_H
  10. #include "Fillablevector.h"
  11. #include <vector>
  12. #include <string>
  13.  
  14. void 
  15. fillBin(std::string filename, Fillable& bin);
  16.  
  17. // Special case to handle vector:
  18. inline void fillBin(std::string filename, 
  19.   std::vector<Trash*>& bin) {
  20.   Fillablevector fv(bin);
  21.   fillBin(filename, fv);
  22. }
  23. #endif // FILLBIN_H ///:~
  24.